package org.jeecg.modules.demo.com.kunpeng.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.demo.com.kunpeng.entity.CommodityPrice;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.com.kunpeng.entity.dto.CommodityPriceQueryListDTO;
import org.jeecg.modules.demo.com.kunpeng.entity.dto.CommodityPurchaseOrSaleDTO;
import org.jeecg.modules.demo.com.kunpeng.vo.CommodityPriceQueryListVO;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Description: 商品价目表
 * @Author: jeecg-boot
 * @Date:   2023-01-11
 * @Version: V1.0
 */
@Transactional
public interface ICommodityPriceService extends IService<CommodityPrice> {

    /**
     * 新增
     */
    void insert(CommodityPrice commodityPrice);

    /**
     *模糊查询
     */
    Page<CommodityPriceQueryListVO> queryListByKeyWords(Page<CommodityPriceQueryListVO> page, CommodityPriceQueryListDTO commodityPriceQueryListDTO);

    /**
     * 修改是否删除
     */
    void updateIsDelete(String id,String isDelete);

    /**
     * 根据商品编码查询对应的商品详情
     */
    CommodityPriceQueryListVO selectCommodityByCommodityCode(String commodityCode);

    /**
     * 采购商品列表
     */
    Page<CommodityPriceQueryListVO> queryPurchaseCommodityList(Page<CommodityPriceQueryListVO>page, CommodityPurchaseOrSaleDTO commodityPurchaseOrSaleDTO);

    /**
     * 销售商品列表
     */
    Page<CommodityPriceQueryListVO> querySalesCommodityList(Page<CommodityPriceQueryListVO>page, CommodityPurchaseOrSaleDTO commodityPurchaseOrSaleDTO);

    /**
     * 根据商品编码模糊查询
     * @param commodityCode
     * @return
     */
    Integer commodityPriceListByCode(String commodityCode);
}
